package cn.yjr.vector;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import cn.yjr.vector.tools.BitmapHelper;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.LayoutParams;
import com.actionbarsherlock.app.SherlockActivity;

import org.json.JSONObject;

public class TransactionDetailActivity extends SherlockActivity
  implements View.OnClickListener
{
  ActionBar actionBar;
  Button complaint_btn;
  Context context;
  ImageView doctor_head_imv;
  String doctor_info = "北医三院 神经科 主任";
  TextView doctor_info_tv;
  String doctor_name = "柳熠";
  TextView doctor_name_tv;
  LayoutInflater inflater;
  JSONObject jsonInfo;
  Handler mHandler;
  String response;
  String time = "2014年4月9日  10:00";
  TextView time_tv;
  View title_bar;
  String transaction_id = "1100 1968 0492 8374 562";
  TextView transaction_id_tv;
  String transaction_money = "200.00";
  TextView transaction_money_tv;

  private void complaint()
  {
  }

  private void initComponent()
  {
    this.doctor_name_tv = ((TextView)findViewById(R.id.doctor_name));
    this.doctor_info_tv = ((TextView)findViewById(R.id.doctor_info));
    this.transaction_id_tv = ((TextView)findViewById(R.id.transaction_id));
    this.time_tv = ((TextView)findViewById(R.id.transaction_time));
    this.transaction_money_tv = ((TextView)findViewById(R.id.transaction_money));
    this.doctor_head_imv = ((ImageView)findViewById(R.id.doctor_head));
    this.doctor_name_tv.setText(this.doctor_name);
    this.doctor_info_tv.setText(this.doctor_info);
    this.transaction_id_tv.setText(this.transaction_id);
    this.time_tv.setText(this.time);
    this.transaction_money_tv.setText(this.transaction_money);
    this.doctor_head_imv.setImageBitmap(BitmapHelper.toRoundBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.head)));
    this.complaint_btn = ((Button)findViewById(R.id.complaint_btn));
  }
  private void initEventListener()
  {
  }

  private void initTitleBar()
  {
	ActionBar.LayoutParams lp = new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,ActionBar.LayoutParams.WRAP_CONTENT,Gravity.CENTER);
    this.title_bar = this.inflater.inflate(R.layout.transaction_detail_action_bar, null);
    this.actionBar.setCustomView(this.title_bar, lp);
    this.actionBar.setDisplayShowHomeEnabled(false);
    this.actionBar.setDisplayShowTitleEnabled(false);
    this.actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    this.actionBar.setDisplayShowCustomEnabled(true);
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(R.layout.activity_transaction_detail);
    this.inflater = getLayoutInflater();
    this.actionBar = getSupportActionBar();
    this.context = this;
    initTitleBar();
    initComponent();
    initEventListener();
  }

/* (non-Javadoc)
 * @see android.view.View.OnClickListener#onClick(android.view.View)
 */
@Override
public void onClick(View v) {
	// TODO Auto-generated method stub
	
}
}